2-Categories
Instead of being a normal person and starting out with the definition of a 2-category, I'm gonna start out with some 2-categorical notions everyone already is familliar with (maybe).
-
Adjunctions.
An adjunction for functors , denoted , is given by
- The unit natural transformation .
- The counit natural transformation .
- The snake identities which you probably remember.
You might notice that we never really refer to the internal structure of the categories involved, other than in unfolding the definitions of functors and natural transformations.
-
Kan Extensions.
I present here only Right Kan Extensions. Given functors , the Right Kan Extension of along , denoted , is given by
- A natural transformation .
- The universal property being that given any other functor with a natural transformation , there is a unique natural transformation s.t. .
Once again the only thing actually referring to the internal structure of a category are unfolding definitions of the things involved, not the things themselves.
-
Monads.
A monad is simply a monoid in the category of endofunctors- sorry I mean… monad is simply a lax 2-functor from to .- sorry wrong timing for that meme.
Take 2: A monad is an endofunctor together with
- The unit natural transformation .
- The multiplication natural transformation .
- Satisfying some relations that you also probably remember.
I'm too lazy to write the same thing a third time, you know what I'm going to say here so pretend this sentence is what it was supposed to be.
There's definetly many other examples but this probably gets the point across. The notion of 2-categories helps us pin down this abstraction and focus on the general picture (hey that's just the motto of category theory all over again), which is:
- Objects (previously, categories)
- Morphisms (previously, functors between categories)
- Morphisms between morphisms (previously, natural transformations between functors)
So after all that "motivation", we now come to the definitions. A (weak) 2-category consists of:
-
Just like before, a collection of objects, but now called -cells.
-
For -cells , is now a whole category, where objects of are called -cells, and morphisms in are called -cells. The category is required to have a special -cell called (which you can probably guess what it means).
Since this is a category, it already comes with a notion of composition (of 2-cells). We call this vertical composition.
-
A functor , which is the composition of -cells. Written sometimes with juxtaposition because it looks nicer.
Its functorial nature gives us the notion of horizontal composition for free; it is simply the result of plugging in -cells into the composition functor.
-
The original category theory laws are now replaced by 2-cell isomorphisms:
- For , 2-cell isomorphisms and .
- For , 2-cell isomorphisms .
-
The interchange law: .
A strict 2-category is the same thing but with identity 2-cells instead of isomorphisms .
A notion of categories should obviously come with a notion of functors, so we define that. A lax 2-functor between (weak) 2-categories consists of:
- For every -cell , a -cell , sometimes also written if lazy.
- For every pair of -cells , a 1-functor . But that is annoying to write so this functor is also just called .
-
The functor laws are now replaced by ordinary -cells:
- For every -cell , a a -cell .
- For -cells in , a -cell .
-
Such that these diagrams commute
A strong 2-functor or a pseudo 2-functor is one where are isomorphisms. A strict 2-functor is where they are identity 2-cells.
Composition of lax 2-functors is easy to define:
- .
- .
- .
- .
The usual category theory diagram notation stuff is extended into what is called Pasting Diagrams. However, there is an alternate diagrammatic calculus for 2-category theory exploiting Poincare duality (idk how), called String Diagrams. The rest of the theory of 2-categories is continued in those articles.